//
//  UserCell.m
//  cm
//
//  Created by suyibaishan on 2017/11/4.
//  Copyright © 2017年 feihu. All rights reserved.
//

#import "UserCell.h"

@implementation UserCell
{
    UIImageView *arrowImg;
}
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self constructUI];
    }
    return self;
}

-(void)constructUI
{
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(20, 0, kScreenWidth - 40, 40)];
    view.layer.borderWidth = 0.5;
    view.layer.borderColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1].CGColor;
    [self.contentView addSubview:view];
    
    _nameLabel = [[UILabel alloc] init];
    _nameLabel.textColor = [UIColor blackColor];
//    _nameLabel.text = @"张良";
    _nameLabel.font = [UIFont systemFontOfSize:14];
    [view addSubview:_nameLabel];
    _nameLabel.sd_layout
    .leftSpaceToView(view, 10)
    .topSpaceToView(view, 7.5)
    .widthIs(kScreenWidth/2)
    .heightIs(25);
    
    arrowImg = [[UIImageView alloc] init];
    arrowImg.image = [UIImage imageNamed:@"arrowImg"];
    [view addSubview:arrowImg];
    arrowImg.sd_layout
    .rightSpaceToView(view, 10)
    .topSpaceToView(view, 10)
    .widthIs(12.5)
    .heightIs(20);
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
